home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / Utime.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-16  |  1.5 KB  |  87 lines

  1. /* Copyright (C) 1986-2001 by Digital Mars. $Revision: 1.1.1.1 $ */
  2. #if __SC__ || __RCC__
  3. #pragma once
  4. #endif
  5.  
  6. #ifndef __UTIME_H
  7. #define __UTIME_H 1
  8.  
  9. #if __cplusplus
  10. extern "C" {
  11. #endif
  12.  
  13. #if !__STDC__
  14.  
  15. #if !defined(_WCHAR_T_DEFINED)
  16. typedef unsigned short wchar_t;
  17. #define _WCHAR_T_DEFINED 1
  18. #endif
  19.  
  20. #if M_UNIX || M_XENIX
  21.  
  22. #include <sys/types.h>
  23.  
  24. typedef long time_t;
  25.  
  26. struct utimbuf
  27. {
  28.    time_t actime;
  29.    time_t modtime;
  30. };
  31.  
  32. #ifndef UTIME_DEFINED
  33. #define UTIME_DEFINED
  34. int __cdecl utime(const char *filename, struct utimbuf *times);
  35. #endif
  36.  
  37. #else /* M_UNIT || M_XENIX */
  38.  
  39. #include <sys\types.h>
  40.  
  41. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  42. #ifndef _CRTAPI1
  43. #define _CRTAPI1 __cdecl
  44. #endif
  45.  
  46. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  47. #ifndef _CRTAPI2
  48. #define _CRTAPI2 __cdecl
  49. #endif
  50.  
  51. /* Define CRTIMP */
  52. #ifndef _CRTIMP
  53. #if defined(_WIN32) && defined(_DLL)
  54. #define _CRTIMP  __declspec(dllimport)
  55. #else
  56. #define _CRTIMP
  57. #endif
  58. #endif
  59.  
  60. struct utimbuf 
  61. {
  62.    time_t actime;   /* access time -- ignored by DOS */
  63.    time_t modtime;  /* modification time */
  64. };
  65.  
  66. #ifndef UTIME_DEFINED
  67. #define UTIME_DEFINED
  68. int __cdecl utime(const char *filename, struct utimbuf *times);
  69. #endif
  70.  
  71. #ifndef WUTIME_DEFINED
  72. #define WUTIME_DEFINED
  73. int __cdecl _wutime(wchar_t *filename, struct utimbuf *times);
  74. #endif
  75.  
  76. #define _utimbuf utimbuf
  77. #define _utime utime
  78.  
  79. #endif /* M_UNIX || M_XENIX */
  80. #endif /* !__STDC__ */
  81.  
  82. #if __cplusplus
  83. }
  84. #endif
  85.  
  86. #endif
  87.